package map.core;

public class LonLatBounds {
    private double minLon;
    private  double maxLon;
    private  double minLat;
    private double maxLat;

    public LonLatBounds(double minLon, double maxLon, double minLat, double maxLat) {
        this.minLon = minLon;
        this.maxLon = maxLon;
        this.minLat = minLat;
        this.maxLat = maxLat;
    }

    public double getMinLon() {
        return minLon;
    }

    public double getMaxLon() {
        return maxLon;
    }

    public double getMinLat() {
        return minLat;
    }

    public double getMaxLat() {
        return maxLat;
    }

    public double getLonSpan(){
        return this.maxLon - this.minLon;
    }

    public double getLatSpan(){
        return  this.maxLat - this.minLat;
    }

    public DoubleRange getLonRange(){
        return new DoubleRange(this.minLon,this.maxLon);
    }

    public DoubleRange getLatRange(){
        return new DoubleRange(this.minLat,this.maxLat);
    }
    @Override
    public String toString() {
        return "LonLatBounds{" +
                "minLon=" + minLon +
                ", maxLon=" + maxLon +
                ", minLat=" + minLat +
                ", maxLat=" + maxLat +
                '}';
    }
}
